package com.smxy.mall.controller;

import com.smxy.mall.common.Response;
import com.smxy.mall.entity.Car;
import com.smxy.mall.service.BuyService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/buy")
public class BuyController {
    @Resource
    private BuyService buyService;

    @RequestMapping("/add")
    public Object add(Car car){
        return Response.success(buyService.save(car));
    }


}
